package com.boot4g.admin.module.sys.service;

import com.baomidou.mybatisplus.service.IService;
import com.boot4g.entity.SysUserTokenEntity;
import com.boot4g.utils.R;

/**
 * 用户Token
 * 
 * @author chenjinjie
 * @email guangyaoliangzijie@163.com
 * @date 2017-03-23 15:22:07
 */
public interface SysUserTokenService extends IService<SysUserTokenEntity> {

	SysUserTokenEntity queryByUserId(Long userId);

	SysUserTokenEntity queryByToken(String token);

	public void update(SysUserTokenEntity token);
	public void save(SysUserTokenEntity token);
	/**
	 * 生成token
	 * @param userId  用户ID
	 */
	R createToken(long userId);

}
